package com.zt.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * @TableName coupons
 */
@TableName(value ="coupons")
@Data
public class Coupons implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String title;

    private String description;

    private Integer type;

    private BigDecimal amount;

    private BigDecimal minSpend;

    private Date startTime;

    private Date endTime;

    private Integer status;

    private Integer uId;

    /**
     * 总发放数量
     */
    private Integer totalCount;

    /**
     * 每人限领数量
     */
    private Integer limitPerUser;

    /**
     * 生效时长（小时）
     */
    private Integer validHours;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    private static final long serialVersionUID = 1L;
}
